package com.zzyl.nursing.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzyl.nursing.domain.FamilyMemberElder;
import com.zzyl.nursing.mapper.FamilyMemberElderMapper;
import com.zzyl.nursing.service.IFamilyMemberElderService;
import com.zzyl.nursing.vo.FamilyMemberElderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @Author cisimu
 * @Date 2025/10/29 22:06
 */
@Service
public class FamilyMemberElderServiceImpl extends ServiceImpl<FamilyMemberElderMapper, FamilyMemberElder> implements IFamilyMemberElderService {
    @Autowired
    private FamilyMemberElderMapper familyMemberElderMapper;

    /**
     * 查询家人列表
     *
     * @param userId
     */
    @Override
    public List<FamilyMemberElderVo> selectBindingElder(Long userId) {
        List<FamilyMemberElderVo> familyMemberElderVos = familyMemberElderMapper.selectBindingElder(userId);
        return familyMemberElderVos;
    }


    /**
     * 解绑老人
     *
     * @param id
     */
    @Override
    public void deleteElderById(Long id) {
        this.removeById(id);
    }
}
